﻿namespace ModuleOne
{
    using System.ComponentModel.Composition;

    using MEF_Test.Contracts;

    /// <summary>
    /// A factory to instanciate <see cref="LocalDriveMediaHandler"/> objects.
    /// </summary>
    [Export(typeof(IMediaHandlerFactory))]
    [ExportMetadata("ContentType", "drive/localHardDrive")]    
    public class LocalDriveMediaHandlerFactory : LocalFolderMediaHandlerFactory
    {
        /// <summary>
        /// Creates the specified media handler.
        /// </summary>
        /// <param name="fileHandler">The file handler.</param>
        /// <returns>An instance of an <see cref="IMediaHandler"/>.</returns>
        public new IMediaHandler Create(IFileHandler fileHandler)
        {
            return new LocalDriveMediaHandler(fileHandler);
        }
    }
}